<template>
	<div class="contentBox margin_top">
		<div class=" mainpadding15 flexleft">
			<!-- 只有优课有图片 -->
			<img class="imgBox margin_right2" :src="child.image_text" alt="" v-if="child.image_text">
			<div class="flexbetween flex1">
				<div class="heightText justify_between_column" style="width: 220px;">
					<div class="text_dt color_three lianghang">{{child.name}}</div>
					<div class="flexleft margin_top1">
						<div class="vipBox margin_right1" v-if="child.is_vip==1">VIP</div>
						<div class="num">编号：{{child.id}}</div>
					</div>
				</div>
				<div class="text_d color_six">已学{{child.view_per}}%</div>
				<div class="">
					<div class="themeBtnBg" @click="goEvaluateOrder(child)">继续</div>
					<!-- <div class="themeBtnBg">考试</div> -->
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		props: {
			child: {
				type: Object,
				default: () => {
					return {}
				}
			}
		},
		data() {
			return {

			}
		},
		methods: {
			goEvaluateOrder(child) { //继续
				let path = "";
				if (child.type == 1) { //优课
					path = "/fineCourse/courseInfo"
				} else if (child.type == 2) { //辅导
					path = "/fineCourse/coach"
				} else if (child.type == 3) { //测试
					path = "/test/testInfo"
				} else if (child.type == 4) { //资料
					path = "/information/informationInfo"
				}
				this.$router.push({
					path,
					query: {
						id: child.education_lesson_id
					}
				})
			},
			goInfo() {
				this.$router.push({
					path: "/mine/studyOrderInfo"
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.contentBox {
		/* // width: 741px; */
		/* // height: 149px; */
		background: #FFFFFF;
		border-radius: 4px 4px 4px 4px;
		border: 1px solid #EAEAEA;
	}

	.imgBox {
		width: 126px;
		height: 74px;
		border-radius: 4px 4px 4px 4px;
	}

	.heightText {
		height: 74px;
	}

	.vipBox {
		padding: 5px 10px;
		background: rgba(255, 0, 0, .1);
		border-radius: 6px 6px 6px 6px;
		font-size: 12px;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #FF0000;
	}

	.num {
		padding: 5px 10px;
		background: rgba(153, 153, 153, .1);
		border-radius: 6px 6px 6px 6px;
		font-size: 12px;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #999999;
	}

	.line {
		width: 0;
		height: 10px;
		border: 1px solid #E9E9E9;
	}
</style>